﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace Common.Utility
{
    /// <summary>
    /// 写二进制文件
    /// </summary>
    class BinaryWriterTxt
    {
        public static void Write(string fileName, byte[] str)
        {
            try
            {
                using (FileStream fileStream = new FileStream(fileName, FileMode.Append, FileAccess.Write))
                {
                    using (BinaryWriter brd = new BinaryWriter(fileStream, Encoding.GetEncoding("gb2312")))
                    {
                        brd.Write(str);
                    }
                }
               
            }
            catch (System.NotSupportedException ex)
            {
                
                return;
            }
        }
    }
}
